package cn.edu.cug.cs.gtl.oi.ui.projecttree;

import cn.edu.cug.cs.gtl.oi.ui.projecttree.ProjectTreeNodeData;
import cn.edu.cug.cs.gtl.protos.Layer;
import cn.edu.cug.cs.gtl.protos.Map;
import cn.edu.cug.cs.gtl.protos.Project;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreeNode;
import java.util.Hashtable;
import java.util.Vector;

public class ProjectTree extends JTree {

    public ProjectTree() {
    }

    public ProjectTree(Object[] value) {
        super(value);
    }

    public ProjectTree(Vector<?> value) {
        super(value);
    }

    public ProjectTree(Hashtable<?, ?> value) {
        super(value);
    }

    public ProjectTree(TreeNode root) {
        super(root);
    }

    public ProjectTree(TreeNode root, boolean asksAllowsChildren) {
        super(root, asksAllowsChildren);
    }

    public ProjectTree(TreeModel newModel) {
        super(newModel);
    }

    private static DefaultMutableTreeNode add(
            final DefaultMutableTreeNode parent,ProjectTreeNodeData userObject,
            final boolean checkable)
    {
        final DefaultMutableTreeNode node = new DefaultMutableTreeNode(userObject);
        parent.add(node);
        return node;
    }
}
